package Shangji3.Service;

import Shangji3.UserService;

public class UserServiceImpl implements UserService {
    @Override
    public void addUser(String username) {
        System.out.println("添加用户: " + username);
        // 模拟业务逻辑执行时间
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
    }

    @Override
    public void deleteUser(String username) {
        System.out.println("删除用户: " + username);
        // 模拟业务逻辑执行时间
        try {
            Thread.sleep(80);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
    }

    @Override
    public String getUser(String username) {
        System.out.println("查询用户: " + username);
        // 模拟业务逻辑执行时间
        try {
            Thread.sleep(50);
        } catch (InterruptedException e) {
            Thread.currentThread().interrupt();
        }
        return "用户信息: " + username;
    }
}
